3.812 \(\int \frac{\sqrt{x} (A+B x)}{\sqrt{a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=144 \[ \frac{2 \sqrt{x} (a+b x) (A b-a B)}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{2 \sqrt{a} (a+b x) (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2} \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{2 B x^{3/2} (a+b x)}{3 b \sqrt{a^2+2 a b x+b^2 x^2}} \]

[Out]

(2*(A*b - a*B)*Sqrt[x]*(a + b*x))/(b^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + (2*B*x^(
3/2)*(a + b*x))/(3*b*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) - (2*Sqrt[a]*(A*b - a*B)*(a
+ b*x)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/(b^(5/2)*Sqrt[a^2 + 2*a*b*x + b^2*x^2]
)

_______________________________________________________________________________________

Rubi [A]  time = 0.207147, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161 \[ \frac{2 \sqrt{x} (a+b x) (A b-a B)}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{2 \sqrt{a} (a+b x) (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2} \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{2 B x^{3/2} (a+b x)}{3 b \sqrt{a^2+2 a b x+b^2 x^2}} \]

Antiderivative was successfully verified.

[In]  Int[(Sqrt[x]*(A + B*x))/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

(2*(A*b - a*B)*Sqrt[x]*(a + b*x))/(b^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + (2*B*x^(
3/2)*(a + b*x))/(3*b*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) - (2*Sqrt[a]*(A*b - a*B)*(a
+ b*x)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/(b^(5/2)*Sqrt[a^2 + 2*a*b*x + b^2*x^2]
)

_______________________________________________________________________________________

Rubi in Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: RecursionError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)*x**(1/2)/((b*x+a)**2)**(1/2),x)

[Out]

Exception raised: RecursionError

_______________________________________________________________________________________

Mathematica [A]  time = 0.0790377, size = 82, normalized size = 0.57 \[ \frac{2 (a+b x) \left (\sqrt{b} \sqrt{x} (-3 a B+3 A b+b B x)+3 \sqrt{a} (a B-A b) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )\right )}{3 b^{5/2} \sqrt{(a+b x)^2}} \]

Antiderivative was successfully verified.

[In]  Integrate[(Sqrt[x]*(A + B*x))/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

(2*(a + b*x)*(Sqrt[b]*Sqrt[x]*(3*A*b - 3*a*B + b*B*x) + 3*Sqrt[a]*(-(A*b) + a*B)
*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]]))/(3*b^(5/2)*Sqrt[(a + b*x)^2])

_______________________________________________________________________________________

Maple [A]  time = 0.011, size = 94, normalized size = 0.7 \[{\frac{2\,bx+2\,a}{3\,{b}^{2}} \left ( B\sqrt{ab}{x}^{{\frac{3}{2}}}b+3\,A\sqrt{ab}\sqrt{x}b-3\,A\arctan \left ({\frac{b\sqrt{x}}{\sqrt{ab}}} \right ) ab-3\,B\sqrt{ab}\sqrt{x}a+3\,B\arctan \left ({\frac{b\sqrt{x}}{\sqrt{ab}}} \right ){a}^{2} \right ){\frac{1}{\sqrt{ \left ( bx+a \right ) ^{2}}}}{\frac{1}{\sqrt{ab}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)*x^(1/2)/((b*x+a)^2)^(1/2),x)

[Out]

2/3*(b*x+a)*(B*(a*b)^(1/2)*x^(3/2)*b+3*A*(a*b)^(1/2)*x^(1/2)*b-3*A*arctan(x^(1/2
)*b/(a*b)^(1/2))*a*b-3*B*(a*b)^(1/2)*x^(1/2)*a+3*B*arctan(x^(1/2)*b/(a*b)^(1/2))
*a^2)/((b*x+a)^2)^(1/2)/b^2/(a*b)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*sqrt(x)/sqrt((b*x + a)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.278314, size = 1, normalized size = 0.01 \[ \left [-\frac{3 \,{\left (B a - A b\right )} \sqrt{-\frac{a}{b}} \log \left (\frac{b x - 2 \, b \sqrt{x} \sqrt{-\frac{a}{b}} - a}{b x + a}\right ) - 2 \,{\left (B b x - 3 \, B a + 3 \, A b\right )} \sqrt{x}}{3 \, b^{2}}, \frac{2 \,{\left (3 \,{\left (B a - A b\right )} \sqrt{\frac{a}{b}} \arctan \left (\frac{\sqrt{x}}{\sqrt{\frac{a}{b}}}\right ) +{\left (B b x - 3 \, B a + 3 \, A b\right )} \sqrt{x}\right )}}{3 \, b^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*sqrt(x)/sqrt((b*x + a)^2),x, algorithm="fricas")

[Out]

[-1/3*(3*(B*a - A*b)*sqrt(-a/b)*log((b*x - 2*b*sqrt(x)*sqrt(-a/b) - a)/(b*x + a)
) - 2*(B*b*x - 3*B*a + 3*A*b)*sqrt(x))/b^2, 2/3*(3*(B*a - A*b)*sqrt(a/b)*arctan(
sqrt(x)/sqrt(a/b)) + (B*b*x - 3*B*a + 3*A*b)*sqrt(x))/b^2]

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\sqrt{x} \left (A + B x\right )}{\sqrt{\left (a + b x\right )^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)*x**(1/2)/((b*x+a)**2)**(1/2),x)

[Out]

Integral(sqrt(x)*(A + B*x)/sqrt((a + b*x)**2), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.272796, size = 127, normalized size = 0.88 \[ \frac{2 \,{\left (B a^{2}{\rm sign}\left (b x + a\right ) - A a b{\rm sign}\left (b x + a\right )\right )} \arctan \left (\frac{b \sqrt{x}}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{2 \,{\left (B b^{2} x^{\frac{3}{2}}{\rm sign}\left (b x + a\right ) - 3 \, B a b \sqrt{x}{\rm sign}\left (b x + a\right ) + 3 \, A b^{2} \sqrt{x}{\rm sign}\left (b x + a\right )\right )}}{3 \, b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*sqrt(x)/sqrt((b*x + a)^2),x, algorithm="giac")

[Out]

2*(B*a^2*sign(b*x + a) - A*a*b*sign(b*x + a))*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(
a*b)*b^2) + 2/3*(B*b^2*x^(3/2)*sign(b*x + a) - 3*B*a*b*sqrt(x)*sign(b*x + a) + 3
*A*b^2*sqrt(x)*sign(b*x + a))/b^3